<?php
/**
 * Created by PhpStorm.
 * User: taotao
 * Date: 2019/9/23
 * Time: 11:13
 */

Route::group(['prefix' => 'usercenter', 'namespace' => 'UserCenter','middleware' => ['web.check_token']], function(){

    //收藏  TODO 暂时不做
    Route::group(['prefix' => 'collection'], function(){
      //  Route::get('lists', 'CollectionController@lists'); //收藏列表
      //  Route::get('detail', 'CollectionController@detail'); //收藏详情
    });

    //商户合作 仅公司和员工 TODO 暂时不做
    Route::group(['prefix' => 'partner'], function(){
       /* Route::get('lists', 'PartnerController@lists');    //合作商列表
        Route::get('order-lists', 'PartnerController@orderList');  //对应合作商订单列表
        Route::get('detail', 'PartnerController@orderDetail');  //交易订单详情*/
    });

    //账户  TODO 暂时不做
    Route::group(['prefix' => 'account'], function(){
       /* Route::get('myaccount', 'AccountController@myAccount');    //账户详情
        Route::get('cash-out', 'AccountController@cashOut');  //提现
        Route::get('cash-in', 'AccountController@cashIn');  //充值
        Route::get('bound', 'AccountController@boundCard');  //绑卡
        Route::get('profit', 'AccountController@profit');  //账户收益
        Route::get('wages-detail', 'AccountController@wagesDetail');  //工资详情
        Route::get('bale-detail', 'AccountController@baleDetail');  //货单详情*/
    });

    //招聘
    Route::group(['prefix' => 'zhaopin'], function(){
        Route::get('resume', 'ZhaoPinController@resume');    //简历预览  -- 员工
        Route::get('accept-list', 'ZhaoPinController@acceptLists');    //应聘列表  -- 员工
        Route::get('accept-detail', 'ZhaoPinController@acceptDetail'); //应聘详情  -- 员工
        //Route::get('lists', 'ZhaoPinController@lists');    //列表  -- 公司和工厂
        //Route::get('detail', 'ZhaoPinController@detail');  //详情
        //Route::get('detail', 'ZhaoPinController@detail');  //发布
    });

    //资讯 仅公司和员工
    Route::group(['prefix' => 'news'], function(){
        Route::get('lists', 'NewsController@lists');    //列表
        Route::get('detail', 'NewsController@detail');  //详情
        Route::post('detail', 'NewsController@edit');  //编辑
        Route::post('add', 'NewsController@add');  //发布

    });

    //订单
    Route::group(['prefix' => 'orders'], function(){
        Route::get('pushing_lists', 'OrderController@pushingLists');    //用户发布的订单  -- 只有公司和工厂
        Route::get('bale_lists', 'OrderController@baleLists');    //抢单中的订单 （我参与的抢单）
        Route::get('produce_lists', 'OrderController@produceLists');    //生产中的订单
        Route::get('over_lists', 'OrderController@overLists');    //已完成的订单
        Route::get('comment', 'OrderController@commentOrder');    //订单评价
        Route::get('grap_detail', 'OrderController@grapDetail');    //抢单详情 - 原料发货
        //Route::get('detail', 'OrderController@detail');    //订单详情
        //Route::get('add', 'OrderController@add');    //发布订单
        //Route::get('grap_detail', 'OrderController@grapDetail');    //确认合作
        //Route::get('grap_detail', 'OrderController@grapDetail');    //改变订单状态（发出原料，接收原料，跟单开始，确认跟单，打包发货，确认收货）

    });
    //zwp,
    /*
    Route::get("test","MaterialController@test");
    Route::get("legalinfo", "MaterialController@getLegalInfoById");//->middleware("web.test_uid");
    */
});


Route::group(['prefix' => 'usercenter', 'namespace' => 'UserCenter','middleware'=>['web.test_check_token']], function(){

        
        
        Route::post("getLegalInfoById","MaterialController@getLegalInfoById");//获取法人信息
        Route::post("saveLegalInfoById","MaterialController@saveLegalInfoById");//保存法人信息
        Route::post("getCompanyInfoById", "MaterialController@getCompanyInfoById");//获取公司信息
        Route::post("saveCompanyInfoById","MaterialController@saveCompanyInfoById");//保存公司信息
        Route::post("getLicences","MaterialController@getLicences");//获取公司认证信息
        Route::post("saveLicences","MaterialController@saveLicences");//保存公司认证信息
        Route::post("getCompanyProducts","MaterialController@getCompanyProducts");//获取公司产品信息
        Route::post("getStyle","MaterialController@getStyle");//获取产品风格
        Route::post("saveStyle","MaterialController@saveStyle");//保存产品风格
 
        Route::post("getProTypes","MaterialController@getProTypes");//获取产品种类信息
        Route::post("saveProTypes","MaterialController@saveProTypes");//保存产品种类信息
        Route::post("getDesigns","MaterialController@getDesigns");//获取产品款式信息
        Route::post("saveDesigns","MaterialController@saveDesigns");//保存产品款式信息
        Route::post("getYields","MaterialController@getYields");//获取产能产量信息

        Route::get("saveYields","MaterialController@saveYields");//保存产能产量信息
        Route::get("getEnvs","MaterialController@getEnvs");//获取公司环境信息
        Route::get("saveEnvs","MaterialController@saveEnvs");//保存公司环境信息

            //资讯 仅公司和员工
        Route::group(['prefix' => 'news'], function(){
        Route::get('lists', 'NewsController@lists');    //列表
        Route::get('detail', 'NewsController@detail');  //详情
        Route::post('edit', 'NewsController@edit');  //编辑
        Route::post('add', 'NewsController@add');  //发布

    });

        Route::group(['prefix' => 'zhaopin'], function(){
        Route::get('getAllCount', 'ZhaoPinController@getAllCount');//招聘列表总数
        Route::get('getZhaoPinLists', 'ZhaoPinController@getZhaoPinLists');//招聘列表
        Route::get('getZhaoPinDetail', 'ZhaoPinController@getZhaoPinDetail');//招聘详情
        Route::post('publishZhaoPin', 'ZhaoPinController@publishZhaoPin');//发布招聘
    });
});

